  precision highp sampler2D;
  uniform sampler2D baseTexture;
  in vec2 v_textureCoordinates;
  vec4 photoshop_desaturate(vec3 color)
  {
      float bw = (min(color.r, min(color.g, color.b)) + max(color.r, max(color.g, color.b))) * 0.5;
      return vec4(bw, bw, bw, 1.0);
  }
  void main()
  {
    vec4 color = texture(baseTexture,v_textureCoordinates);
    color.rgb = photoshop_desaturate(color.rgb).rgb;
    out_FragColor = color;
  }